package src.main.danli;

/**
 * 懒汉式单例模式  多线程会破坏此单例模式 改用静态代码块或者内部类
 */
public class  IdlerSingle {
    private IdlerSingle() {
    }

    public static IdlerSingle idlerSingle;

    public static IdlerSingle getIdlerSingle() {
        if (idlerSingle == null) {
            idlerSingle = new IdlerSingle();
        }
        return idlerSingle;
    }

}
